package gedou;

public class gameTest {
    public static void main(String[] args) {
        role r1 = new role("张三", 100, '男');
        role r2 = new role("李四", 100, '女');
        r1.showRole();
        r2.showRole();


        while (true) {
            r1.attack(r2);
            if (r2.getBlood() == 0) {
                System.out.println(r1.getName() + "KO了" + r2.getName());
                break;
            }

            r2.attack(r1);
            if (r1.getBlood() == 0) {
                System.out.println(r2.getName() + "KO了" + r1.getName());
                break;
            }


        }
    }
}
